package com.xinxin.blockchain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ys
 * @date 2021/5/20
 */
@Getter
@AllArgsConstructor
public enum SignUpTypeEnum {

    ACCOUNT_NAME("AccountName"),
    MOBILE("Mobile"),
    EMAIL("Email"),
    ROBOT("Robot"),
    ;

    private String type;

    public static SignUpTypeEnum getByType(String type) {
        for (SignUpTypeEnum value : SignUpTypeEnum.values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }

        return null;
    }
}
